﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            IClimbTree ict = new Cat();
            ClimbTree(ict);

            ISwim swim = new Duck();
            Swim(swim);

            Animal a = new Dog();
            Eat(a);
        }
        static void ClimbTree(IClimbTree ict)
        {
            ict.ClimbTree();
        }
        static void Swim(ISwim iswim)
        {
            iswim.swim();
        }
        static void Eat(Animal animal)
        {
            animal.eat();
        }
    }
}
